Skip to content

bugfix: DatePicker second month disabled in multi-month view - #4623

Closed
toyeshhm wants to merge 1 commit into
skeletonlabs:mainfrom
toyeshhm:bugfix/4007-date-picker-visible-range
Closed

toyeshhm wants to merge 1 commit into
skeletonlabs:mainfrom
toyeshhm:bugfix/4007-date-picker-visible-range

Conversation

@toyeshhm

Copy link
Copy Markdown
Contributor

Linked Issue(s)

Closes #4007

Description

With numOfMonths={2}, every day in the second month's table is disabled, even when the cell gets the visibleRange from getOffset().

DatePicker.TableCell (Svelte and React) splits its props with zag's splitTableCellProps, which only keeps disabled, value and columns. visibleRange falls into the leftover props. So it never reaches getDayTableCellProps/getDayTableCellTriggerProps, and it is spread onto the <td> as visiblerange="[object Object]". Without it, zag checks each cell against the default one-month range starting at the first visible month. Every day of the second month counts as outside the range and gets disabled. zag 1.47.0 (the latest) still splits the same way.

The fix pulls visibleRange out before the split and adds it back to the cell props. Those props go to zag and into the table cell context, so TableCellTrigger gets it too. When visibleRange is not set, zag still falls back to its default range, so single-month pickers behave the same.

Tests: the date picker fixtures in both packages now have a cell for 1970-02-15 with a February 1970 visibleRange, and a new TableCell test checks that the cell has no aria-disabled or visibleRange attribute and that its trigger has no data-disabled. Before the fix the test fails in both packages because the cell is aria-disabled. After the fix it passes. pnpm test, pnpm check, pnpm lint:check and pnpm format:check all pass.

Checklist

Please read our contribution requirements and make sure you have:

  • Prefixed your branch name with: docs/, feature/, task/, bugfix/
  • Targeted the main branch
  • Documented any changes made
  • Supplied a changeset (if changes were made to any project within /packages)

Changesets

View our documentation to learn more about changesets. To create a changeset:

  1. Navigate to the root of the monorepo in your terminal
  2. Run pnpm changeset and follow the prompts
  3. Commit and push the changeset before flagging your PR ready for review.

Copilot AI balanced review requested due to automatic review settings November 18, 2026 18:40
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
www.skeleton.dev Ready Ready Preview Nov 18, 2026 6:42pm UTC

Request Review

@vercel

vercel Bot commented Nov 18, 2026

Copy link
Copy Markdown

@toyeshhm is attempting to deploy a commit to the Skeleton Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Hugos68

Hugos68 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

@toyeshhm Thanks for the PR but if this is an issue with how Zag's splitter works we should open a PR in ZagJS, not here. We rely on consistent behaviour from ZagJS, we do not steer away or patch their mistakes.

@Hugos68 Hugos68 closed this Nov 18, 2026

This branch was successfully deployed

2 active deployments
Preview – themes.skeleton.dev — c7a4c43e Deployed Nov 18, 2026 by vercel[bot]
Preview – www.skeleton.dev — c7a4c43e Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Date Picker disables 2nd month in dual month view

3 participants